package org.duncan.sjge.gamedata.sprites;

import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import org.duncan.sjge.events.RenderEvent;
import javax.imageio.ImageIO;

/**
 *
 * @author Duncan
 */
public class Sprite {
    private final BufferedImage mImg;
    
    Sprite(final File file) throws IOException {
        mImg = ImageIO.read(file);
    }
    
    public void render(final RenderEvent ev, final AffineTransform at) {
        ev.getCanvas().drawImage(mImg, at, null);
    }
}
